package cate.game.train.rune.msg;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBTrain;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "徽章上锁的请求")
public class RuneLockReq implements MsgInput {
    @NoteField(value = "上锁 true /解锁 false")
    public boolean lock;

    @NoteField(value = "徽章uid")
    public String uid;

    @NoteField(value = "英雄uid", detail = "如果穿戴在英雄身上的话")
    public String heroUid;

    @NoteField(value = "穿戴位置")
    public byte pos;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        game.train.rune.lock(cc.getRole(), uid, heroUid, pos, lock);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBTrain.RUNE_LOCK_REQ;
    }
}
